Api query extension

ABSTRACT

Methods, systems, and program products for processing API queries are disclosed. In some embodiments, in response to a data request that is received from a user interface and that includes a first query and one or more extension references, an application modifies the data request by replacing a first extension reference of the one or more extension references with a query post-processing script. In response to receiving the modified data request, an intermediate service transacts the first query with a first data source having a network address included in the modified data request to obtain a first query result. The intermediate service executes the query post-processing script based, at least in part, on the first query result.

BACKGROUND

The disclosure generally relates to the field of data processing, andmore particularly to providing an expanded query interface.

Application program interfaces (APIs) may be characterized as sets ofrequirements and specifications that govern, as well as the code thatimplements, how programs interact with each other. In some contexts,APIs enable an application program to interact with another programwithin a particular processing and/or networking platform such as over aTCP/IP network. Among other interface functions, some APIs implementquery functions. For example, so-called Open API (sometimes referred toas public API) encompasses specifications, requirements, and codeconforming to those requirements that provides clients with networkaccess to a variety of data and program resources including webservices. An open API interface may be configured to implement a queryfunction by providing a mutually compatible format by which a networkclient can generate and transmit a query conforming to the API protocolto a backend data system such as a database. The backend system utilizesthe open API to interpret and execute the query request and return thequery results to the network client.

BRIEF DESCRIPTION OF THE DRAWINGS

Embodiments of the disclosure may be better understood by referencingthe accompanying drawings.

FIG. 1 is a block diagram depicting subsystems, devices, and othercomponents for implementing an API data request processing system inaccordance with some embodiments;

FIG. 2 is a block diagram illustrating an example API data requestprocessing system in accordance with some embodiments;

FIG. 3 illustrates an example HTTP command including a UniversalResource Locator (URL) and extended query generated by a queryapplication program interface (API) within a networked data processingsystem in accordance with some embodiments;

FIG. 4 is a flow diagram illustrating operations and functions forgenerating and processing an API data request within a networkedprocessing environment in accordance with some embodiments;

FIG. 5 is a flow diagram depicting operations and functions forprocessing API data requests in a distributed data resource environmentin accordance with some embodiments; and

FIG. 6 is a block diagram depicting an example computer system thatgenerates and executes API data requests in accordance with someembodiments.

DESCRIPTION

The description that follows includes example systems, methods,techniques, and program flows that embody embodiments of the disclosure.However, it is understood that this disclosure may be practiced withoutthese specific details. For instance, this disclosure refers tointegrating data sources that store computing components and associatedperformance data in illustrative examples. Aspects of this disclosurecan also be applied to other types of data sources in which other typesof items are inventoried in association with other types of associateddescription information. In some instances, well-known instructioninstances, protocols, structures and techniques have not been shown indetail in order not to obfuscate the description.

Overview

Systems, methods, devices and other hardware and software components aredisclosed and described herein for generating and processing API queriessuch as may be incorporated within network resource locators. Theembodiments described herein address data and processing logicavailability related to queries from a client to a backend resource suchas a network server. Some embodiments reduce the need to modify eitherthe query initiator client programs or the target backendservices/systems to which the queries are sent. To this end, embodimentsmay include components that generate or re-generate an original queryrequest to include a call to another backend service to retrieveinformation that may not be available on the target backend system. Forexample, the client query request may be originally generated using anetwork resource locator protocol such as a URL that specifies requestedinformation as a parameter within a primary query.

To retrieve information/data associated with the primary query, anextension such as in the form of a query post-processing script may beadded to the client request to generate an intermediate query request.In some embodiments, the intermediate query request includes the locatorinformation or address (e.g., network and/or filesystem pathname) of theprimary query parameter and further includes a query extension thatspecifies one or more secondary parameters. In some embodiments, thequery extension within the intermediate query request does not includingsome or all of the locator/address information for the secondaryparameter(s).

Example Illustrations

FIG. 1 is a block diagram depicting subsystems, devices, and othercomponents for implementing an API data request processing system inaccordance with some embodiments. As shown in FIG. 1, the API datarequest processing system includes a client device 102 which may be amobile processing device. Client device 102 includes any combination ofhardware and program code for communicating with other nodes via anetwork 105, which may be a wide area network. Client device 102includes a network interface 132, a processor 134, and an associatedsystem memory 136 that stores data and system and application software.

Network interface 132 comprises hardware and software components toimplement transceiver connectivity and protocol processing to enablemobile device 102 to communicate with network-connected devices. Networkinterface 132 includes a network interface controller (not depicted) andother devices and logic components for connecting, disconnecting andsending and receiving messages across local and wide area networks.Processor 134 and memory 136 provide additional processing capabilitynecessary for network communications and to enable mobile device 102 toperform other information handling tasks related to, incidental to, orunrelated to the methods described herein. Mobile device 102 may be asmartphone or other type of mobile phone or highly integrated portabledevice or any other type of portable electronic programmed device havingnetwork connectivity.

Mobile device 102 is configured to execute a report application 138 thatincludes program instructions and data for accessing and retrievinginformation from other network-connected nodes such as a server 110 andone or more of servers 106 and 108 within a backend system 104. Forexample, report application 138 may be configured to retrieveinfrastructure management data that may be gathered by and stored withindatabases 112 and 114. In the depicted embodiment, database 114 receivesand stores performance management data such as may be generated by aperformance monitoring system (not depicted) that monitors computing andnetworking systems, devices, and programs. Database 114 includes a table122 for storing performance data in association with information thatidentifies or otherwise describes the particular devices beingmonitored. Table 122 includes multiple row-wise records that eachinclude a device ID field, an Internet Protocol (IP) address field, anda utilization field. For instance, the second row-wise record of table122 associates device ID AB-7606 with IP address 10.251.1.3 and autilization metric of 49.35%.

In the depicted embodiment, server node 110 is a geolocation server nodeand backend system 104 is an infrastructure management backend systemcomprising server nodes 106 and 108. Each of server nodes 106, 108, and110 includes server platform hardware and software for responding toclient data retrieval requests for information stored within databases112, 114, and 116, respectively. Server nodes 106, 108, and 110 eachinclude a query API interface, such as a REST API, configured to read,process, and respond to API queries, such as HTTP formatted queries. Forexample, network nodes may generate and transmit HTTP queries to servernodes 106, 108, and 110 as URLs that include a query portion in additionto a web address. To this end, each of server nodes 106, 108, and 110includes program constructs for communicating with network nodes such asclient node 102 including respective APIs by which, for example, aserver node can respond to client-side API requests. Database 116receives and stores geographic location information that may beassociated with global IP addresses including IP addresses of systemsand devices tracked within database 114. Within backend system 104,database 112 stores a set of data aggregation scripts that areconfigured to calculate or otherwise algorithmically determinestatistics and other results from performance metric data such as theutilization data stored within database 114.

As shown, database 112 includes a library 120 containing multipleutilization functions including a utilization function applied todevices located worldwide. Specifically, the depicted worldwideaggregation function is programmed to identify and collect theidentifiers (IDs) and possibly additional system/device information forall systems and devices having a utilization metric of at least 50%.Library 120 further includes aggregation function scripts that areprogrammed to determine similar information for systems and deviceslocated in European Union (EU), Asia Pacific (AP), and North America(NA) geographic regions. Database 116 includes a geolocation table 124that includes multiple row-wise records that each include an IP addressfield, a longitude field, a latitude field, and a description field. Forexample, the first row-wise record of table 124 associates IP address10.251.1.2 with a longitude value −70.76, a latitude value +43.08, and ageo description “PORTSMOUTH (CORE RTR).”

Each of the servers 106, 108, and 110 hosting databases 112, 114, and116 include a respective query API for processing client API requestsincluding data retrieval requests. Mobile device 102 includes an APIquery communication interface within a browser 140 that implements aquery API such as a REST API. Report application 138 may generate a dataretrieval request from user interface (UI) input and deliver the requestvia browser 140. In the depicted embodiment, browser 140 includes an APIquery builder 142 a comprising program code configured to generate amodified API data request in accordance with the operations andfunctions disclosed herein. In one aspect, API query builder 142 areceives from report application 138 an API data request such as may beimplemented as an HTTP URL. The data request may be received by APIquery builder 142 a from a UI generated by report application 138 inresponse to, for example, user selection of a graphically displayed datarequest object.

As depicted and described in further detail with reference to FIGS. 2-5,the data request may include a query portion such as a query requestingspecified information items. For example, the query may include anetwork address (e.g., address portion of query URL) of a backendsystem/device such as one of servers 106, 108, or 110. In associationwith the network address, the query further includes a requestedinformation specifier such as a parameter ID. For example, if the querynetwork address is the address for server 108, the requested informationspecifier may be a device ID variable and/or a utilization metricvariable included in a storage pathname. The data request furtherincludes an extension reference that is associated with the queryportion. As depicted and described in further detail with reference toFIGS. 2-5, the extension reference is essentially a fixed ID of a querypost-processing script and is initially included in the data request bywhichever client application (e.g., report application 138) initiallygenerates the data request. The post-processing script identified by orwithin the extension reference conforms to a particular API format andprotocol, typically the same API format and protocol that the clientdevice uses to send the overall data request, such as REST.

In accordance with some embodiments, the data request generated byreport application 138 is received and processed by API query builder142 a to generate a modified data request. Specifically, API querybuilder 142 a is configured to parse the data request to determinewhether the request includes an extension reference. In response todetermining and locating the extension reference, API query builder 142a replaces the extension reference within the request with a querypost-processing script corresponding to the extension references. Insome embodiments, the query post-processing script includes instructionsfor implementing a secondary or otherwise supplemental query withrespect to the query included in the original, unmodified data request.In the same or alternate embodiments, the query post-processing scriptincludes instructions for calculating or otherwise computing a resultbased on processing the original or supplemental query results using aspecified function or algorithm.

Having identified the request as including the extension reference andhaving modified the request accordingly, API query builder 142 aencapsulates the modified data request within a higher-order (first tobe processed in accordance with network and transport protocol)intermediate query service request. The intermediate service request maycomprises a URL request conforming to HTTP that includes a networkaddress of a system 146 that hosts an intermediate query service. Theintermediate query service includes an API query engine 148 and, inembodiments in which an API query builder is not implemented by theclient node, may further include an API query builder 142 b. API queryengine 148 includes any combination of program code constructs fortransacting the original information query included in the unmodifieddata request with the data source (e.g., backend system) to which theoriginal information query is directed. API query engine 148 is furtherconfigured to execute the query post-processing script inserted into themodified data request by either API query builder 142 a or 142 b.

As depicted and described in further detail with reference to FIGS. 2-5,API query engine 148 is configured to, in conjunction with the originalquery transaction, execute the query post-processing script based, atleast in part, on the information results of the original querytransaction. For instance, query engine 148 may receive a modified datarequest that includes an original information query directed via URLaddress to server node 108 or performance management database 114 andvia implicit HTTP method protocol or express instruction requests deviceIP addresses stored by database 114. Query engine 148 transacts theinformation query with server 108 to retrieve a query result thatincludes a list of device IDs including AB-3845, AB-7606, and AB-3636and corresponding IP addresses 10.251.1.2, 10.251.1.3, and 10.251.1.4.

Query engine 148 processes the IP addresses portion of the query resultto reform the query post-processing script, which may be in template orvariable form into a form that may be executable to obtain results basedon the original query results. For example, query engine 148 may includeIP addresses 10.251.1.2, 10.251.1.3, and 10.251.1.4 as arguments in thequery post-processing script which is then executed by query engine 148.Continuing with the example, the query post-processing script mayinclude the URL address of server 110 or geolocation database 116 andmay further include instructions for retrieving longitude and latitudeinformation stored in database 116. Query engine 148 begins execution ofthe query post-processing script by parsing the script content and/orthe instruction portion of the original query and/or the informationincluded in the query result to identify one or more dependenciesbetween the script and the instruction portion of the query and/orinformation contained in the query result. For example, query engine 148may identify as a dependency the match between a requested itemspecified as a variable in the query post-processing script and the sameor similar variable specified in the original query.

Query engine 148 may utilize the identified dependencies to determinethe manner in which to execute the query post-processing script. Forinstance, query engine 148 may determine, in accordance with theidentified dependencies that a supplemental query is required. Inresponse, query engine 148 generates a supplemental information queryhaving instruction content that depends on the identified dependencies,the original query results, and/or portions of the query post-processingscript itself. For embodiments in which the post-processing scriptincludes a data processing function, execution by query engine 148 ofthe script includes applying a portion of the received query results asoperands processed by the data processing function to generate apost-processing result.

Query engine 148 generates a supplemental query and/or performs a dataprocessing function on the original query results in accordance with thereformed query post-processing script. The results of the supplementalquery and/or post-query processing function are merged and transmittedto report application 138 within client device 102.

FIG. 2 is a block diagram illustrating an example system that includessubsystems, devices, and other components for processing data requestsincluding generating and processing API query extensions in accordancewith some embodiments. The components of the system depicted in FIG. 2may be implemented in the network environment depicted in FIG. 1. Thesystem includes a client system 202 that is configured using anycombination of hardware and program code constructs to execute systemand application software including a device report application 206.Device report application 206 may be configured to request or otherwiseaccess infrastructure management data such as device ID, IP addresses,and performance metrics collected by a monitoring system (not depicted).Device report application 206 includes a UI layer 210 that provides anI/O interface for users of client system 202.

Client system 202 includes a user input device 208 such as a keyboardand/or display-centric input device such as a screen pointer device. Auser can use input device 208 to enter commands (e.g., displayed objectselect) or data that are processed via a UI layer 210 and received bythe system and/or application software executing within theprocessor-memory architecture (not expressly depicted) of client system202. User input signals from input device 208 may be translated askeyboard or pointer commands directed to device report application 206.In some embodiments, device report application 206 is configured, inpart, to generate graphical objects, such as a management display object258 by a display module 212. Graphical representations of managementdisplay object 258 are rendered via UI layer 210 on a display device214, such as a computer display monitor.

Device report application 206 is further configured to include a querybuilder module 245 that may be configured to perform the operations andfunctions described with reference to FIGS. 1, 4, and 5. Among otherprogram components, device report application 206 includes apost-processing script insert unit 246 and a URL encode unit 248.Post-processing script insert unit 246 includes program instructions forprocessing a data request received via UI layer 210, such as may beselected or otherwise generated by input device 208. In someembodiments, script insert unit 246 includes code for parsing the datarequest to determine whether the request includes a query extensionreference and replacing the extension reference with a correspondingpost-processing script. URL encoding unit 248 includes program instructsfor re-encoding a modified data request generated by script insert unit246 to conform to a network protocol used to communicate with othernetwork nodes.

Client system 202 further includes a query API 204 for communicatingover a network 217 with an intermediate query service 230. In someembodiments, intermediate query service 230 includes program componentsand data that may be hosted by a server processing platform thecomponents of which are not depicted to avoid obfuscation of theoperational principles and system configuration features describedherein. Intermediate query service 230 includes a query engine 232 thatis configured using various program and data constructs to receive andprocess modified data requests generated by the query builder 245 withinclient 202. The modified query processing includes transacting aninformation query included in the original (i.e., UI provided) datarequest and, in conjunction with the query transaction, executing apost-processing script included in the modified data request.

Intermediate query service 230 transacts the information query with abackend data source such as one of web service hosts 218 and 220 thatare communicatively coupled to intermediate query service 230 vianetwork 217. Each of web service hosts 218 and 220 comprise anycombination of hardware, program code, and data for retrieving andstoring information within respective information databases 222 and 224.

Referring to FIG. 3, a representation is depicted of some of thecomponents within a UI-supplied data request and a modified data requestthat may be processed by devices and components illustrated in FIG. 2.FIG. 3 depicts a code development object 300 containing an example HTTPcommand including a URL and extended query such as may be generated by aquery API within a networked data processing system in accordance withsome embodiments. Code development object 300 may be generated anddisplayed such by an integrated development environment (IDE) codedevelopment tool and includes several sections that define, describe,and otherwise characterize a data request implemented as an HTTPcommand.

As shown, the HTTP command itself is defined as being an OpenAPIprotocol data request. Some of the description/definition sectionsinclude a content definition section defining the content of the datarequest as XML application type. Other sections define the username“admin,” the password “admin002,” and character set as UTF-8. The HTTPcommand comprising the example data request includes a scheme portion302 defining the command as an HTTP command. The HTTP command furtherincludes a Uniform Resource Locator (URL) portion 304 and an extendedquery portion 306. URL portion 304 comprises a host field 308 thatspecifies a host ID for a system or device to which a primary query 316within the extended query portion 306 is directed.

URL portion 304 further includes a port field 310 and a path field 312.Port field 310 specifies “8581” as the numeric ID for the host port towhich the primary query is to be transmitted. Path field 312 specifies adata management path (e.g., file system path) “/odata/api/devices?” asthe host path to be accessed to retrieve data requested per the primaryquery 316. In addition to primary query 316, extended query portion 306includes a query extension portion 314 that specifies a query extensionreference, “aggr1,” within the context in which the extension is appliedwith respect to primary query 316.

Referring back to the system depicted in FIG. 2, the HTTP commanddepicted in FIG. 3 is processed by both the query builder 245 withindevice report application 206 and the query engine 232 withinintermediate query service 230. To implement the data request processingfunction, query builder 245 and query engine 232 perform steps ofmodifying the HTTP command and processing the modified command in orderto efficiently implement a query extension interface as now explained inan example description of a series of operations and functions.

FIG. 2 is annotated with a series of letters A-Q. These lettersrepresent stages of operations performed during one or more of a portionof an API query processing cycle. Although these stages are ordered forthis example, the stages illustrate one example to aid in understandingthis disclosure and should not be used to limit the claims. Subjectmatter falling within the scope of the claims can vary with respect tothe order and some of the operations.

At stage A, a data request input using input device 208 via UI 210 isreceived by query builder 245 within device report application 206. Forthis example operation series example, the data request comprises theHTTP command depicted in FIG. 3 which includes a URL query portioncomprising “http://HOST:8581/odata/api/device?”. As illustrated in FIG.3, the URL query portion corresponds to and includes scheme portion 302,host ID portion 308, port ID portion 310, and path 312. At stage B,post-processing script insert unit 246 parses the data request todetermine whether the request includes an extension reference. If so,and continuing with stage B, script insert unit 246 accesses anextension script table 252 to identify a post-processing script thatcorresponds to the extension reference within the data request.

In the depicted embodiment, extension script table 252 includes multiplerow-wise records that each include a script ID index field associatedwith a script content field. For example, the first record of extensionscript table 252 specifies “aggr1” as the ID corresponding to theextension reference “aggr1” within the HTTP command shown in FIG. 3.Associated within the table record with the “aggr1” script ID is thescript content, represented in FIG. 2 as “<SCRIPT_1>.” The depicted<SCRIPT_1>content represents post-process script code depicted in FIG. 3as the code within a script code template 320. As shown in FIG. 3, thescript code is initially a template that, at line 1, specifies an IPaddress variable “IP” as being defined to be the “PRIMARY ADDRESS” to beobtained via the “CONTEXT.GET” instruction from the results of primaryquery 316.

At line 3, the script code template 320 further specifies the variableGEO _URL as being defined to include the geo-decoded URL information forthe IP addresses obtained as “PRIMARY ADDRESS” from the results of theprimary query 316. At lines 4-7, script code template 320 includes aREST extension plugin for URL encoding each of the GEO_URL results(i.e., each of the geo-decoded URLs for each IP address in the resultsfor primary query 316). At lines 8-10, script code template 320 definesthe variables “GEO-TOKENS” to be the result of a function “GEORES.RESPONSE.SPLIT(”,“)” that is configured to extract longitude andlatitude information for each of the geo-decoded URLs. At line 12,script code template 320 includes a RETURN instruction for returning theextracted longitude and latitude values as matched pairs correspondingto each geo-decoded URL.

Referring to FIG. 2, and continuing with stage B, post-processing scriptinsert unit 246 modifies the data request (e.g., HTTP command) byreplacing the extension reference “{aggr1}” with the script codetemplate 320. At stage C, URL encode 248 URL encodes (sometime referredto as percent encoding) the resultant modified data query fortransmission across network 217. The URL encoded data request is sent toa query API 204 at stage D and forwarded to a query port 234 that iswithin the configuration of query engine 232 (stage E). The data requestis decoded by query port 234 and next received and processed by an onquery unit 236 within query engine 232.

Onquery unit 236 includes program instructions for processing thereceived modified data request during a first phase. At stage F, onqueryunit 236 reads the modified data request to determine the format andprotocol of some or all of the modified data request. In particular,onquery unit 236 determines the processing protocol of thepost-processing script template and accesses an extension plugin library250 to select a corresponding extension plugin. Continuing with theexample, onquery unit 236 determines that post-processing scripttemplate 320 conforms to HTTP REST protocol and, in response, identifiesand selects the REST EPLUGIN extension plugin to be used to processportions of the modified data request including the post-processingscript template. The REST extension plugin is executed to process themodified data request including transacting primary query 316 with webservices host 218.

Transacting the query includes identifying the target IP address ofprimary query 316 as comprising the URL portion 304 and sending theprimary, information query 316 to query port 238 (stage G). At stage H,primary query 316 is transmitted to web services host 218 whichprocesses the query and returns the query results in the form of one ormore IP addresses of devices to query engine 232 where it is received byonquery unit 236 at stage I. Onquery unit 236 passes the query resultsand portions of the modified data request including the post-processingscript template to a post process routine 240 (stage J). At stage K,post process routine 240 executes the post-processing script using thetemplate and the query results as input. For example, post processroutine 240 may utilize the IP addresses obtained from the initial queryas operands in the “PrimarylPAddress” field of the query extension 314and/or script template code 320. In some embodiments, post processroutine 240 may access a query post-processing library 254 that storesmultiple post-processing routines and functions. For example,intermediate query service 230 may further include program codecomponents that may be executed to accumulate post-processing scriptsthat are received from client nodes such as client system 202.

Having executed the post-processing script, the results frompost-processing and from the original query are merged by merge routine242 and sent to query port 234 (stage L). The merged results aretransmitted from query port 234 to query API 204 (stage M), whichforwards the merged results to device report application 206 (stage N).At stage 0, device report application 206 sends the merged results todisplay module 212 which generates display object therefrom (stage P).The display object is then rendered on display device 214 as amanagement graphical object 260 (stage Q).

FIG. 4 is a flow diagram illustrating operations and functions forgenerating and processing an API data request within a networkedprocessing environment in accordance with some embodiments. Theoperations and functions depicted in FIG. 4 may be performed by one ormore of the systems, devices, and components illustrated and describedwith reference to FIGS. 1-3. The process begins as shown at block 402with a query builder program component such as may be implemented aspart of a report application receiving and reading a data request from areport application. In some embodiments, the data request may comprise aquery URL conforming to HTTP REST protocol. The data request includes afirst information query such as a query that requests specifiedinformation items such as IP addresses corresponding to network devices.Associated with the first information query within the data request is anetwork address (e.g., address portion of URL). The extension referencemay comprise a fixed text symbol associated, based on the data requestprotocol (e.g., REST), with an extension indicator.

At block 404, the query builder determines whether or not the data queryincludes an extension ID. In some embodiments, the query builder mayinclude a parsing component for parsing and comparing symbols within thedata request to identify an extension reference. In other embodiments,the query builder determines that the data request includes an extensionreference by reading the protocol specific extension indicator that isassociated with the fixed text symbol representing the reference. Inresponse to determining that the data request does not include anextension reference, the query builder returns control to othercomponents of the report application which transact the query with theaddressed data source (block 406). The transacting of the queryconcludes with the data source returning query results to the requestingreport application (block 408).

In response to the query builder determining at block 404 that the datarequest includes an extension reference, control passes to superblock410 with a sequence of operations for modifying the data request byreplacing the extension reference with a query post-processing script.The modification sequence begins at block 412 with the query builderperforming a lookup to locate script code corresponding to the extensionreference. For example, the query builder may access a local extensionreference table such as table 252 in FIG. 2 and use the extensionreference ID or other symbol as an index to locate a correspondingscript. As shown at steps 414 and 418, in response to identifying acorresponding post-processing script locally, the query builder selectsand inserts the script into the data request. In response to the querybuilder determining at block 414 that a corresponding script is notlocally available, the data request is transmitted to an intermediatequery service that maintains a list of post-processing scripts one ofwhich may correspond to the extension reference.

Following modification of the data request at blocks 412 through 418,the modified data request is transmitted to a query engine within anintermediate query service. At block 420, the query engine transacts theoriginal information query with the data source having a network addressthat is included in the original, unmodified data request. The querytransaction concludes with the data source returning query resultinformation to the query engine. At block 422, the query engine executesthe post-processing script within the modified data request based, atleast in part, on the query result information received from the datasource. The process concludes at block 424 with the query engine mergingresults from executing the post-processing script execution and thequery result information and transmitting the merged information to thereport application.

FIG. 5 is a flow diagram depicting operations and functions forprocessing API data requests in a distributed data resource environmentin accordance with some embodiments. The operations and functionsdepicted in FIG. 5 may be performed by one or more of the systems,devices, and components illustrated and described with reference toFIGS. 1-4. The process begins as shown at block 502 with an intermediatequery service receiving and parsing a modified data request. In someembodiments, and as described with reference to FIGS. 1-4, the modifieddata request may be generated by a query builder executing from a clientapplication platform or within the intermediate query service. Based onthe parsing, a query engine within the intermediate query serviceidentifies an API protocol type based on a URL and or other portions ofthe modified data request (block 504).

At block 506, the query engine selects an API extension pluginexecutable corresponding to the identified API protocol type. Forexample, in response to identifying the modified data request or thepost-processing script portion as conforming to the HTTP REST protocol,the query engine selects a REST extension plugin to execute at least thepost-processing script portion of the modified data request. In additionto selecting a plugin to execute the post-processing script, the queryengine begins execution of the overall data request by identifying andtransmitting the information query portion of the data request to a datasource identified by the network address contained in the request (block508).

Continuing as shown at blocks 510 and 511, if the information requestedin the information query is not available at the data source, theintermediate query service generates and transmits an error message tothe client application. If the information is available as determined atblock 510, the query engine receives the information results from thedata source at block 512. Next, as shown at superblock 514, the queryengine executes a series of operations for executing the querypost-processing script. The post-processing script execution sequencebegins as shown at block 516 with the query engine parsing thepost-processing script and original query instructions and, in someembodiments, the result information received from the data source toidentify dependencies between the post-processing script and either orboth portions of the original query instructions and the received resultinformation. Proceeding as shown at block 518, the query enginedetermines whether or not the post-processing script includes a dataprocessing function. Example data processing functions include aggregatedata functions such as algorithms to determine max, min, average, etc.

In response to determining that the post-processing function includes adata processing function, the query engine applies a portion of thereceived query result information as operands to be processed inaccordance with the identified data function (block 520). Following thequery engine processing the received query result information asoperands to generate post-processing results, the query enginedetermines whether an additional information query is specified orotherwise required by the post-processing script (block 522). Inresponse to determining at block 522 that an additional query isrequired, the query engine concludes the query post-processing scriptexecution sequence by generating a supplemental information query (block524) based on the content of the post-processing script, thedependencies identified at block 516, and the result informationreceived from the data source at block 512. The query engine transactsthe supplemental query including determining a data source address fromthe post-processing script (e.g., HTTP://FREEGEOIP.NET in FIG. 3) andtransmitting the supplemental query to the data source. The query enginereceives resultant query results from the data source. At block 526, thequery engine merges the first query results with the processing resultsfrom block 522 and/or the supplemental query results and transmits themerged information results to the client application. The processconcludes with the client application (e.g., report application)displaying the merged information on a computer display device (block528).

Variations

The flowcharts are provided to aid in understanding the illustrationsand are not to be used to limit scope of the claims. The flowchartsdepict example operations that can vary within the scope of the claims.Additional operations may be performed; fewer operations may beperformed; the operations may be performed in parallel; and theoperations may be performed in a different order. It will be understoodthat each block of the flowchart illustrations and/or block diagrams,and combinations of blocks in the flowchart illustrations and/or blockdiagrams, can be implemented by program code. The program code may beprovided to a processor of a general purpose computer, special purposecomputer, or other programmable machine or apparatus.

As will be appreciated, aspects of the disclosure may be embodied as asystem, method or program code/instructions stored in one or moremachine-readable media. Accordingly, aspects may take the form ofhardware, software (including firmware, resident software, micro-code,etc.), or a combination of software and hardware aspects that may allgenerally be referred to herein as a “circuit,” “module” or “system.”The functionality provided as individual modules/units in the exampleillustrations can be organized differently in accordance with any one ofplatform (operating system and/or hardware), application ecosystem,interfaces, programmer preferences, programming language, administratorpreferences, etc.

Any combination of one or more machine readable medium(s) may beutilized. The machine readable medium may be a machine readable signalmedium or a machine readable storage medium. A machine readable storagemedium may be, for example, but not limited to, a system, apparatus, ordevice, that employs any one of or combination of electronic, magnetic,optical, electromagnetic, infrared, or semiconductor technology to storeprogram code. More specific examples (a non-exhaustive list) of themachine readable storage medium would include the following: a portablecomputer diskette, a hard disk, a random access memory (RAM), aread-only memory (ROM), an erasable programmable read-only memory (EPROMor Flash memory), a portable compact disc read-only memory (CD-ROM), anoptical storage device, a magnetic storage device, or any suitablecombination of the foregoing. In the context of this document, a machinereadable storage medium may be any tangible medium that can contain, orstore a program for use by or in connection with an instructionexecution system, apparatus, or device. A machine readable storagemedium is not a machine readable signal medium.

A machine readable signal medium may include a propagated data signalwith machine readable program code embodied therein, for example, inbaseband or as part of a carrier wave. Such a propagated signal may takeany of a variety of forms, including, but not limited to,electro-magnetic, optical, or any suitable combination thereof. Amachine readable signal medium may be any machine readable medium thatis not a machine readable storage medium and that can communicate,propagate, or transport a program for use by or in connection with aninstruction execution system, apparatus, or device.

Program code embodied on a machine readable medium may be transmittedusing any appropriate medium, including but not limited to wireless,wireline, optical fiber cable, RF, etc., or any suitable combination ofthe foregoing.

Computer program code for carrying out operations for aspects of thedisclosure may be written in any combination of one or more programminglanguages, including an object oriented programming language such as theJava® programming language, C++ or the like; a dynamic programminglanguage such as Python; a scripting language such as Perl programminglanguage or PowerShell script language; and conventional proceduralprogramming languages, such as the “C” programming language or similarprogramming languages. The program code may execute entirely on astand-alone machine, may execute in a distributed manner across multiplemachines, and may execute on one machine while providing results and oraccepting input on another machine.

The program code/instructions may also be stored in a machine readablemedium that can direct a machine to function in a particular manner,such that the instructions stored in the machine readable medium producean article of manufacture including instructions which implement thefunction/act specified in the flowchart and/or block diagram block orblocks.

FIG. 6 is a block diagram depicting an example computer system thatgenerates and executes API queries in accordance with some embodiments.The computer system includes a processor unit 601 (possibly includingmultiple processors, multiple cores, multiple nodes, and/or implementingmulti-threading, etc.). The computer system includes memory 607. Thememory 607 may be system memory (e.g., one or more of cache, SRAM, DRAM,zero capacitor RAM, Twin Transistor RAM, eDRAM, EDO RAM, DDR RAM,EEPROM, NRAM, RRAM, SONOS, PRAM, etc.) or any one or more of the abovealready described possible realizations of machine-readable media. Thecomputer system also includes a bus 603 (e.g., PCI, ISA, PCI-Express,HyperTransport® bus, InfiniBand® bus, NuBus, etc.) and a networkinterface 605 (e.g., a Fiber Channel interface, an Ethernet interface,an internet small computer system interface, SONET interface, wirelessinterface, etc.). The system also includes query generation andprocessing components within a query API client 615 and an intermediatequery service 611 such as may incorporate the systems, devices, andcomponents depicted and described with reference to FIGS. 1-5. Theintermediate query service 611 provides program structures forgenerating and processing API queries as described with reference toFIGS. 1-5. To this end, the intermediate query service 611 mayincorporate and/or utilize some or all of the system, devices,components, and data structures described in FIGS. 1-5. Communicativelycoupled to the integration layer via network interface 605 is query APIclient 615 and multiple backend systems 619, 620, and 621.

Any one of the previously described functionalities may be partially (orentirely) implemented in hardware and/or on the processor unit 601. Forexample, the functionality may be implemented with an applicationspecific integrated circuit, in logic implemented in the processor unit601, in a co-processor on a peripheral device or card, etc. Further,realizations may include fewer or additional components not illustratedin FIG. 6 (e.g., video cards, audio cards, additional networkinterfaces, peripheral devices, etc.). The processor unit 601 and thenetwork interface 605 are coupled to the bus 603. Although illustratedas being coupled to the bus 603, the memory 607 may be coupled to theprocessor unit 601.

While the aspects of the disclosure are described with reference tovarious implementations and exploitations, it will be understood thatthese aspects are illustrative and that the scope of the claims is notlimited to them. In general, techniques for generating and processingAPI queries as described herein may be implemented with facilitiesconsistent with any hardware system or hardware systems. Manyvariations, modifications, additions, and improvements are possible.

Plural instances may be provided for components, operations orstructures described herein as a single instance. Finally, boundariesbetween various components, operations and data stores are somewhatarbitrary, and particular operations are illustrated in the context ofspecific illustrative configurations. Other allocations of functionalityare envisioned and may fall within the scope of the disclosure. Ingeneral, structures and functionality shown as separate components inthe example configurations may be implemented as a combined structure orcomponent. Similarly, structures and functionality shown as a singlecomponent may be implemented as separate components. These and othervariations, modifications, additions, and improvements may fall withinthe scope of the disclosure.

As used herein, the term “or” is inclusive unless otherwise explicitlynoted. Thus, the phrase “at least one of A, B, or C” is satisfied by anyelement from the set {A, B, Cl or any combination thereof, includingmultiples of any element.

What is claimed is:
 1. A method for processing queries, said methodcomprising: in response to a data request that is received from a userinterface and that includes a first query and one or more extensionreferences, an application modifying the data request by replacing afirst extension reference of the one or more extension references with aquery post-processing script; and in response to receiving the modifieddata request, an intermediate service, transacting the first query witha first data source having a network address included in the modifieddata request to obtain a first query result; and executing the querypost-processing script based, at least in part, on the first queryresult.
 2. The method of claim 1, wherein said modifying the datarequest comprises: accessing records that map each of multiple querypost-processing scripts to a respective one of multiple extensionreferences; locating a record that maps the query post-processing scriptto the first extension reference; and inserting into the data requestoutside of the first query, the query post-processing script that ismapped to the first extension reference.
 3. The method of claim 1,wherein the first query comprises an information query and wherein thedata request specifies the network address of the first data source,said transacting the first query comprising: transmitting theinformation query to the first data source; and receiving firstinformation within the first query result from the first data source inresponse to the information query.
 4. The method of claim 3, whereinsaid executing the query post-processing script comprises parsing thequery post-processing script and the received first information toidentify one or more dependencies between the query post-processingscript and the received first information.
 5. The method of claim 4,wherein the query post-processing script includes a data processingfunction, said executing the query post-processing script furthercomprising applying a portion of the received first information asoperands processed by the data processing function to generate apost-processing result.
 6. The method of claim 4, wherein said executingthe query post-processing script further comprises: determining, basedon at least one of the identified dependencies, whether a supplementalinformation query is required; and in response to determining that asupplemental information query is required, generating the supplementalinformation query based on content of the query post-processing script,the at least one of the identified dependencies, and the received firstinformation.
 7. The method of claim 1, further comprising: obtainingpost-processing information from said executing the querypost-processing script; merging information within the first queryresult with the post-processing information; and the applicationdisplaying the merged information.
 8. The method of claim 1, furthercomprising: transmitting the modified data request to an intermediatequery service that includes API extension plugins for one or more APIprotocols; and the intermediate query service, identifying an APIprotocol type based on the modified data request; selecting an APIextension plugin corresponding to the identified API protocol; andexecuting the modified data request using the selected API extensionplugin.
 9. One or more non-transitory machine-readable media comprisingprogram code for processing queries, the program code to: in response toa data request that is received from a user interface and that includesa first query and one or more extension references, modify the datarequest by replacing a first extension reference of the one or moreextension references with a query post-processing script; and inresponse to receiving the modified data request, transact the firstquery with a first data source having a network address included in themodified data request to obtain a first query result; and execute thequery post-processing script based, at least in part, on the first queryresult.
 10. The machine-readable media of claim 9, wherein the programcode to modify the data request comprises program code to: accessrecords that map each of multiple query post-processing scripts to arespective one of multiple extension references; locate a record thatmaps the query post-processing script to the first extension reference;and insert into the data request outside of the first query, the querypost-processing script that is mapped to the first extension reference.11. The machine-readable media of claim 9, wherein the first querycomprises an information query and wherein the data request specifiesthe network address of the first data source, the program code totransact the first query comprising program code to: transmit theinformation query to the first data source; and receive firstinformation within the first query result from the first data source inresponse to the information query.
 12. The machine-readable media ofclaim 11, wherein the program code to execute the query post-processingscript comprises program code to parse the query post-processing scriptand the received first information to identify one or more dependenciesbetween the query post-processing script and the received firstinformation.
 13. The machine-readable media of claim 12, wherein theprogram code to execute the query post-processing script furthercomprises program code to: determine, based on at least one of theidentified dependencies, whether a supplemental information query isrequired; and in response to determining that a supplemental informationquery is required, generate the supplemental information query based oncontent of the query post-processing script, the at least one of theidentified dependencies, and the received first information.
 14. Themachine-readable media of claim 9, wherein the program code furtherincludes program code to: obtain post-processing information from saidexecuting the query post-processing script; merge information within thefirst query result with the post-processing information; and display themerged information.
 15. The machine-readable media of claim 9, whereinthe program code further includes program code to: transmit the modifieddata request to an intermediate query service that includes APIextension plugins for one or more API protocols; and identify an APIprotocol type based on the modified data request; select an APIextension plugin corresponding to the identified API protocol; andexecute the modified data request using the selected API extensionplugin.
 16. An apparatus comprising: a processor; and a machine-readablemedium having program code executable by the processor to cause theapparatus to: in response to a data request that is received from a userinterface and that includes a first query and one or more extensionreferences, modify the data request by replacing a first extensionreference of the one or more extension references with a querypost-processing script; and in response to receiving the modified datarequest, transact the first query with a first data source having anetwork address included in the modified data request to obtain a firstquery result; and execute the query post-processing script based, atleast in part, on the first query result.
 17. The apparatus of claim 16,wherein the first query comprises an information query and wherein thedata request specifies the network address of the first data source, theprogram code further comprising program code to cause the apparatus to:transmit the information query to the first data source; and receivefirst information within the first query result from the first datasource in response to the information query.
 18. The apparatus of claim17, the program code further comprising program code to cause theapparatus to parse the query post-processing script and the receivedfirst information to identify one or more dependencies between the querypost-processing script and the received first information.
 19. Theapparatus of claim 18, the program code further comprising program codeto cause the apparatus to: determine, based on at least one of theidentified dependencies, whether a supplemental information query isrequired; and in response to determining that a supplemental informationquery is required, generate the supplemental information query based oncontent of the query post-processing script, the at least one of theidentified dependencies, and the received first information.
 20. Theapparatus of claim 16, the program code further comprising program codeto cause the apparatus to: transmit the modified data request to anintermediate query service that includes API extension plugins for oneor more API protocols; and identify an API protocol type based on themodified data request; select an API extension plugin corresponding tothe identified API protocol; and execute the modified data request usingthe selected API extension plugin.